﻿<template>
    <div class="enter">
        <div class="area">
            <img class="logo"
                 src="./img/logo.png"
                 alt=""
                 width="100">
        </div>
        <img class="text"
             src="./img/text.png"
             alt=""
             width="80%">

        <router-link to="type-list"
                     class="enter-btn"
                     tag="button">
            <img src="./img/btn-bg.png"
                 alt=""
                 width="194">
        </router-link>
        <div class="newBot">
            <div class="bottom-bg">
                <img class="bottom"
                     src="./img/bg-1.png"
                     style="width: 100%;">
            </div>
            <div @click='goNews'
                 class="enter-bottom">
                <img src="./img/news.png" /> 消息
            </div>
        </div>
    </div>
</template>
<script>
export default {
    name: "enter",
    methods: {
        goNews () {
            let href = window.location.origin+window.location.pathname+window.location.hash
            var url1 = encodeURIComponent(href + 'news')
            // var url1 = encodeURIComponent('http://mobile.bosafe.com/game/#/news')
            window.location.href = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxf873bd7fdb2bd0be&redirect_uri=' + url1 + '&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'
        },
    }
}
</script>

<style scoped lang="less">
.enter {
    .area {
        width: 80%;
        margin: 0 auto;
    }
    .logo {
        margin: 20px 0;
    }
    height: 100%;
    position: relative;
    background: url('img/bg.png') left top no-repeat;
    background-size: 100% 100%;
    .text {
        display: block;
        margin: 0 auto;
    }
    .enter-btn {
        display: block;
        margin: 20px auto;
        border: none;
        outline: none;
        background: none;
    }
    .enter-bottom {
        width: 100%;
        display: block;
        height: 6.5rem;
        background: #45a8e0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2rem;
        color: #fff;
        img {
            height: 4rem;
            width: 4rem;
            margin-right: 1rem;
        }
    }
    p {
        font-size: 14px;
        color: #555555;
    }
    .bottom-bg {
       img {
            height: 5rem;
        }
    }
    .newBot {
        position: absolute;
        bottom: 0;
        width: 100%;
    }
}
</style>
